1. Field of the Invention
The present invention relates to an inspection apparatus using a template matching method.
2. Description of the Related Art
A technology for searching through a target image for a given specific shape (template) has been widely used as template matching (see Section 8.3 of Digital Picture Processing by Azriel Rosenfeld and Avinash C. Kak). Also, attempts to increase the speed of template matching such as determining matching positions faster by integrating similarities between a template and each of an x-projection and y-projection of a search image as disclosed in Japanese Patent Application Laid-Open No. 2003-85565 and those to make template matching more accurate such as estimating similarities of a search image even with a lot of noise to a template by considering a local similarity distribution as disclosed in Japanese Patent Application Laid-Open No. 61-98483 have been made.
Template matching to determine a measuring position is performed also for measurement of patterns on a semiconductor wafer using a scanning electron microscope. Rough alignment of the measuring position is performed by moving a stage on which the wafer is placed, but only with accuracy of the stage alignment, a gross deviation may be caused on an image photographed under high magnification of the scanning electron microscope. In order to correct the deviation to make measurement at the correct position, template matching is performed. More specifically, by registering unique patterns near a measuring position as a template, relative coordinates of the measuring position viewed from the template are stored. To determine a measuring position from a photographed image, a matching position is determined by performing template matching before moving from the matching position by the relative coordinates to reach the measuring position.
In template matching for a scanning electron microscope, first a measuring position of an object (a) is photographed and a unique pattern contained therein is registered as a template. An image (b) photographed at this point is called a template selection image and a unique pattern (c) selected from the template selection image is called a template. Next, when another object (a′) ((a′) may be another position having the same pattern on the same wafer as (a), for example, the same portion of a die formed repeatedly on the same wafer, or a position having the same pattern on a different wafer) is photographed, a photographed image is searched for a pattern that matches the template. The photographed image (b′) is called a search image. There is a deviation of a positioning error of the stage between the template selection image (b) and the search image (b′). The deviation is corrected by template matching. As a result of template matching, positions with a high degree of similarity to the template become matching position candidates and, among these candidates, a position most suitable as a matching position will be the final matching position. If, for example, the method disclosed in the above Japanese Patent Application Laid-Open No. 61-98483 is used, a distribution of local similarities calculated by subdividing the template is determined for each candidate before determining the final matching position by considering the distribution.
In the above means for performing template matching for a scanning electron microscope, a photographed template selection image is input into a template registration part for registration of a template and then a unique pattern selected manually or automatically is cut out by a template cutout part as a template before being stored. A photographed search image is input into an image search part that searches for a matching position with the template before being checked against the template by a search image similarity calculation part. Search image similarity distribution information showing how a degree of similarity to the template is distributed in the search image is output by the search image similarity calculation part. A matching position determination part determines a matching position based on the search image similarity distribution information. At this point, a point with the highest degree of similarity may simply be selected as a matching position or the method disclosed in Japanese Patent Application Laid-Open No. 61-98483 may be used. When the method disclosed in Japanese Patent Application Laid-Open No. 61-98483 is used, the search image similarity distribution information contains information about local similarities to the subdivided template. If, as disclosed in Japanese Patent Application Laid-Open No. 2003-85565, a similarity distribution between a template and each of an x-projection and y-projection of a search image is held, a matching position can be determined at high speed.
As has been described above, though a conventional template matching technique has devised, for example, a method of estimating similarities of a search image to a template with high accuracy even if the search image contains a lot of noise by considering a local similarity distribution, if there is a pattern similar to the template in the search image, the matching position may be determined erroneously due to an influence of pattern distortion, unevenness in image luminance or the like, leading to an erroneous decision of coordinates of the similar pattern as the matching position.
A subject of the present invention is to provide a template matching method that outputs a correct matching position even if a pattern similar to a template exists in a search image. The present invention also provides an inspection apparatus using thereof.